using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Default2 : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        String type = Request.QueryString["Type"] + "";
        String ma = Request.QueryString["Ma"] + "";
        String ten = Request.QueryString["Ten"] + "";
        String moTa = Request.QueryString["MoTa"] + "";

        String maMenu = ma;
        String tenMenu = ten;
        String maMon = moTa;
       

        String maLoaiMon = ma;
        String tenLoaiMon = ten;

        String maKhachHang = ma;
        String tenKhachHang = ten;
        String diachi = moTa;

        if (type == "1")
        {
            Session["MaMon"] = ma;
            Session["TenMon"] = ten;
            Session["MoTa"] = moTa;
            Control ucprofile = LoadControl("usercontrols/ucSearchMon.ascx");
            SearchResult.Controls.Add(ucprofile);
        }
        else
            if (type == "2")
            {                
                Session["MaMenu"] = maMenu;
                Session["MaMon"] = maMon;
                Session["TenMenu"] = tenMenu;               
                Control ucprofile = LoadControl("usercontrols/ucSearchMenu.ascx");
                SearchResult.Controls.Add(ucprofile);
            }
            else
                if (type == "3")
                {                    
                    Session["MaMon"] = maMon;
                    Session["TenMon"] = ten;
                    Session["MoTa"] = moTa;
                    Control ucprofile = LoadControl("usercontrols/ucSearchMonUaThich.ascx");
                    SearchResult.Controls.Add(ucprofile);
                }
                else
                    if (type == "4")
                    {
                        Session["MaMenu"] = maMenu;
                        Session["MaMon"] = maMon;
                        Session["TenMenu"] = tenMenu;
                        Control ucprofile = LoadControl("usercontrols/ucSearchMenuUaThich.ascx");
                        SearchResult.Controls.Add(ucprofile);
                    }
                    else
                        if (type == "5")
                        {                            
                            Session["MaLoaiMon"] = maLoaiMon;
                            Session["TenLoaiMon"] = tenLoaiMon;
                            
                            Control ucprofile = LoadControl("usercontrols/ucSearchLoaiMon.ascx");
                            SearchResult.Controls.Add(ucprofile);
                        }
                        else
                            if (type == "6")
                            {
                                Session["MaKhachHang"] = maLoaiMon;
                                Session["TenKhachHang"] = tenLoaiMon;
                                Session["DiaChi"] = diachi;
                                Control ucprofile = LoadControl("usercontrols/ucSearchKhachHang.ascx");
                                SearchResult.Controls.Add(ucprofile);
                            }
    }
}
